<?php
use \tpfcore\Core;
?>
<!doctype html>
<head>
        <meta charset="utf-8">
        <!-- Set render engine for 360 browser -->
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- HTML5 shim for IE8 support of HTML5 elements -->
        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js">
            </script>
        <![endif]-->
        <link href="{$admin_assets_path}/css/theme.min.css" rel="stylesheet">
        <link href="{$admin_assets_path}/css/simplebootadmin.css" rel="stylesheet">
        <link href="{$admin_assets_path}/css/default.css" rel="stylesheet" />
        <link href="{$admin_assets_path}/css/font-awesome.min.css" rel="stylesheet" type="text/css">
        <style>
            .length_3{width: 180px;} form .input-order{margin-bottom: 0px;padding:3px;width:40px;}
            .table-actions{margin-top: 5px; margin-bottom: 5px;padding:0px;} .table-list{margin-bottom:
            0px;}
        </style>
        <!--[if IE 7]>
            <link rel="stylesheet" href="{$admin_assets_path}/css/font-awesome-ie7.min.css">
        <![endif]-->
        <script type="text/javascript">
            //全局变量
            var GV = {
                WEB_ROOT:"",
                DIMAUB: "/",
                JS_ROOT: "/theme/backend/assets/js/",
                TOKEN: ""
            };
        </script>
        <!-- Le javascript==================================================-
        -> <!-- Placed at the end of the document so the pages load faster -->
        <script src="{$admin_assets_path}/js/jquery.js"></script>
        <script src="{$admin_assets_path}/js/wind.js"></script>
        <script src="{$admin_assets_path}/js/bootstrap.min.js"></script>
        <script src="{$admin_assets_path}/kindeditor/kindeditor-min.js"></script>
        <link href="{$admin_assets_path}/kindeditor/themes/default/default.css" rel="stylesheet"/>
        <style type="text/css">.btn{padding:2px 8px; font-size: 14px;}</style>
    </head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('payment/Payment/index')}">支付管理</a></li>
    </ul>
    <form method="post" class="js-ajax-form" action="term/listorders">
        <table class="table table-hover table-bordered">
            <thead>
                <tr>
                    <th width="50">序号</th>
                    <th>支付接口名称</th>
                    <th>支付平台介绍</th>
                    <th>前台排序</th>
                    <th>当着状态</th>
                    <th width="140">管理</th>
                </tr>
            </thead>
            <tbody>
                {foreach name="list" item="vo"}
                <tr>
                    <td>
                        {eq name="vo.status" value="0"}
                        {$key+1}
                        {else/}
                        {$vo.id}
                        {/eq}
                    </td>
                    <td>
                        {empty name="vo.id"}
                        {$vo.pay_name}
                        {else/}
                        <input type="text" value="{$vo.pay_name}" class="ajax-text" data="Payment|pay_name|id|{$vo.id}" action="{:url('Payment/ajaxdata')}"/>
                        {/empty}
                    </td>
                    <td>
                        {empty name="vo.id"}
                        {$vo.pay_name}
                        {else/}
                        <input type="text" value="{$vo.pay_desc}" class="ajax-text" data="Payment|pay_desc|id|{$vo.id}" action="{:url('Payment/ajaxdata')}"/>
                        {/empty}
                    </td>
                    <td>
                        {empty name="vo.id"}
                        {$vo.pay_name}
                        {else/}
                        <input type="text" value="{$vo.sort}" class="ajax-text" data="Payment|sort|id|{$vo.id}" action="{:url('Payment/ajaxdata')}"/>
                        {/empty}
                    </td>
                    <td>
                        {empty name="vo.id"}
                        <img src="/data/assets/images/btn_disable.gif"/>
                        {else/}
                        {eq name="vo.status" value="1"}
                        <img src="/data/assets/images/btn_enable.png" class="ajax-status" data="Payment|status|id|{$vo.id}" action="{:url('Payment/ajaxdata')}"/>
                        {else/}
                        <img src="/data/assets/images/btn_disable.gif" class="ajax-status" data="Payment|status|id|{$vo.id}" action="{:url('Payment/ajaxdata')}"/>
                        {/eq}
                        {/empty}
                    </td>
                    <td>
                        {empty name="vo.id"}
                        <a class="btn confirm ajax-get js-ajax-dialog-btn"  href="{:url('Payment/install',['key'=>$key])}"><i class="fa fa-bolt"></i> 安 装</a>
                        {else/}
                        <a class="btn btn-info confirm ajax-get"  href='{:url('Payment/config',['id'=>$vo.id,'handle'=>$vo.pay_handle])}'><i class="fa fa-remove"></i> 配置 </a>
                        <a class="btn btn-warning confirm ajax-get js-ajax-dialog-btn"  href="{:url('Payment/uninstall',['id'=>$vo.id])}"><i class="fa fa-remove"></i> 卸 载</a>
                        {/empty}
                    </td>
                </tr>
                {/foreach}
            </tbody>
        </table>
    </form>
</div>
<script src="{$admin_assets_path}/js/common.js"></script>
</body>
</html>